<?php
class MessageController extends FrontendController
{
    public function actionSend()
    {
        $email = $_REQUEST['email'];
        $cname = $_REQUEST['cname'];
        $content = $_REQUEST['content'];

        $this->connection->createCommand("insert into rk_plug_message (email,cname,content) value (:email,:cname,:content)")
            ->bindParam(":email",$email)
            ->bindParam(":cname",$cname)
            ->bindParam(":content",$content)
            ->execute();

        echo json_encode(AppCode::$success);
    }

}